import axios from '@/utils/request.js'

// 购物车列表
export function getCartListAPI() {
        return axios({
                url: '/member/cart',
        })
}

// 加入购物车
export function addCartAPI(data) {
        return axios({
                url: '/member/cart',
                method: 'post',
                data
        })
}

// 删除购物车
export function delCartAPI(ids) {
        return axios({
                url: '/member/cart',
                method: 'delete',
                data: {
                        ids
                }
        })
}

// 合并购物车
export function mergerCartAPI(data) {
        return axios({
                url: '/member/cart/merge',
                method: 'post',
                data: data
        })
}
